import uvicorn
from pywebio import config
from pywebio.platform.fastapi import asgi_app

from src.api import app
from src.controller.run_manage import html_show_run
from src.menus import show_menus

css = """
.container {
    margin-top: 0;
    max-width: 100%;
    margin-left: 0px;
    margin-top: 0px;
    background-color: #FFFCFB;
    background-image: null;
    background-size: 100% 100%;
}
"""
config(css_style=css)
# 注册菜单路由
# 注册菜单路由
app.mount("/menus", asgi_app(show_menus))
app.mount("/", asgi_app(html_show_run,cdn=False))

if __name__ == '__main__':
    uvicorn.run(app, port=8000)
